package com.test.ssh.dao;

import org.hibernate.Session;
import org.hibernate.SessionFactory;

/**
 * Created with IntelliJ IDEA. Description:
 *
 * @author lzy
 * @create 2018-10-08 下午4:06
 */
public abstract class BaseDao {
  private SessionFactory sessionFactory;

  public void setSessionFactory(SessionFactory sessionFactory) {
    this.sessionFactory = sessionFactory;
  }

  Session getSession() {
    return this.sessionFactory.getCurrentSession();
  }
}
